<template>
  <div class="content login-content">
    <div class="section section-banner">
      <p>达飞监察管理系统</p>
    </div>
    <div class="section section-login">
      <el-form :ref="refFormName" :rules="loginRules" :model="loginForm" @keyup.enter.native="submitForm">
        <el-form-item prop="username">
          <el-input type="text" v-model="loginForm.username" auto-complete="off" placeholder="请输入公司邮箱">
            <i slot="prefix" class="icon i-user"></i>
          </el-input>
        </el-form-item>
        <el-form-item prop="password">
          <el-input :type="typeType" v-model="loginForm.password" auto-complete="off" placeholder="请输入密码">
            <i slot="prefix" class="icon i-password"></i>
            <i slot="suffix" class="icon" :class="[showPassword?'i-view':'i-unview']" @click="switchPassword"></i>
          </el-input>
        </el-form-item>
        <el-form-item>
          <button type="button" @click="submitForm" :class="{'btn-loading':loading}">登录</button>
        </el-form-item>
      </el-form>
    </div>
    <div class="footer">
      <p class="copyright">©深圳达飞金融控股有限公司 版权所有</p>
    </div>
  </div>
</template>

<script>
  import loginMixin from './login'
  export default {
    name: 'login',
    mixins: [loginMixin]
  }
</script>